package com.ruoyi.domain.dto;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

public class BookDto extends BaseEntity {


        private static final long serialVersionUID = 1L;

        /** 用户名 */
        private Long bookId;

        /** 书名 */
        @Excel(name = "书名")
        @NotBlank(message = "书名不能为空")
        private String name;

        /** 作者 */
        @NotNull(message = "作者不能为空")
        @Excel(name = "作者")
        private int author;

        /** 出版社 */
        @Excel(name = "出版社")
        @NotNull(message = "出版社不能为空")
        private int publish;

        /** 介绍 */
        @Excel(name = "介绍")
        private String introduction;

        /** 书的价格 */
        @Excel(name = "书的价格")
        @NotNull(message = "价格不能为空")
        private BigDecimal price;

        /** 语言 */
        @Excel(name = "语言")
        @NotNull(message = "语言不能为空")

        private int language;

        /** 数量 */
        @Excel(name = "数量")
        @NotNull(message = "数量不能为空")

        private Long number;

        /** 图片地址 */
        @Excel(name = "图片地址")
        private String url;

        /** 分类id */
        @Excel(name = "分类id")
        @NotBlank(message = "图书分类不能为空")

        private String categoryId;

        /** 书架位置 */
        @Excel(name = "书架位置")
        @NotBlank(message = "书架位置不能为空")

        private String location;

        /** $column.columnComment */
        @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
        @NotBlank(message = "ISBN不能为空")

        private String isbn;

        /** 书本状态（0正常 1停用） */
        @Excel(name = "书本状态", readConverterExp = "0=正常,1=停用")
        private Long isDelete;

        public void setBookId(Long bookId)
        {
            this.bookId = bookId;
        }

        public Long getBookId()
        {
            return bookId;
        }
        public void setName(String name)
        {
            this.name = name;
        }

        public String getName()
        {
            return name;
        }
        public void setAuthor(int author)
        {
            this.author = author;
        }

        public int getAuthor()
        {
            return author;
        }
        public void setPublish(int publish)
        {
            this.publish = publish;
        }

        public int getPublish()
        {
            return publish;
        }
        public void setIntroduction(String introduction)
        {
            this.introduction = introduction;
        }

        public String getIntroduction()
        {
            return introduction;
        }
        public void setPrice(BigDecimal price)
        {
            this.price = price;
        }

        public BigDecimal getPrice()
        {
            return price;
        }
        public void setLanguage(int language)
        {
            this.language = language;
        }

        public int getLanguage()
        {
            return language;
        }
        public void setNumber(Long number)
        {
            this.number = number;
        }

        public Long getNumber()
        {
            return number;
        }
        public void setUrl(String url)
        {
            this.url = url;
        }

        public String getUrl()
        {
            return url;
        }
        public void setCategoryId(String categoryId)
        {
            this.categoryId = categoryId;
        }

        public String getCategoryId()
        {
            return categoryId;
        }
        public void setLocation(String location)
        {
            this.location = location;
        }

        public String getLocation()
        {
            return location;
        }
        public void setIsbn(String isbn)
        {
            this.isbn = isbn;
        }

        public String getIsbn()
        {
            return isbn;
        }
        public void setIsDelete(Long isDelete)
        {
            this.isDelete = isDelete;
        }

        public Long getIsDelete()
        {
            return isDelete;
        }

        @Override
        public String toString() {
            return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                    .append("bookId", getBookId())
                    .append("name", getName())
                    .append("author", getAuthor())
                    .append("publish", getPublish())
                    .append("introduction", getIntroduction())
                    .append("price", getPrice())
                    .append("language", getLanguage())
                    .append("number", getNumber())
                    .append("url", getUrl())
                    .append("categoryId", getCategoryId())
                    .append("location", getLocation())
                    .append("isbn", getIsbn())
                    .append("createBy", getCreateBy())
                    .append("createTime", getCreateTime())
                    .append("updateBy", getUpdateBy())
                    .append("updateTime", getUpdateTime())
                    .append("isDelete", getIsDelete())
                    .append("remark", getRemark())
                    .toString();
        }


}
